package com.mallcloud.mall.mall.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.mallcloud.mall.common.core.constant.enums.mall.StoreEnum;
import com.mallcloud.mall.common.core.util.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel(value = "MallStoreModel", description = "门店")
@Data
@TableName("MANAUNIT")
public class MallStoreModel implements Serializable {
	private static final long serialVersionUID = 1L;

	@JsonSerialize(using = ToStringSerializer.class)
	@NotNull(message = "ID为空", groups = {ValidGroup.Update.class})
	@TableId(value = "mucode", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "编码")
	private Long storeNo;

	@ApiModelProperty(value = "中文名称")
	@TableField("mucname")
	private String storeName;

	@ApiModelProperty(value = "状态")
	@TableField("mustatus")
	private String status;

	@ApiModelProperty(value = "联系电话")
	@TableField("mutel")
	private String phone;

	@ApiModelProperty(value = "EMAIL")
	@TableField("muemail")
	private String email;

	@ApiModelProperty(value = "地址")
	@TableField("muaddr")
	private String addr;

	@ApiModelProperty(value = "备注")
	@TableField("mumemo")
	private String memo;

	/**
	 * {@link StoreEnum.StoreTypeEnum}
	 */
	@ApiModelProperty(value = "类型")
	@TableField("mutype")
	private String type;

}
